daily-update #65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: daily-update | |
defaults: | |
run: | |
working-directory: esg-ui | |
env: | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
on: | |
workflow_dispatch: | |
# no need for keep rebuilding as it's stable now | |
# schedule: | |
# - cron: '0 21 * * *' | |
jobs: | |
cd: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [14] | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@master | |
with: | |
lfs: true | |
- name: Setup node env 🏗 | |
uses: actions/setup-node@v2.4.1 | |
with: | |
node-version: ${{ matrix.node }} | |
check-latest: true | |
- name: Cache node_modules 📦 | |
uses: actions/cache@v2.1.6 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies 👨🏻💻 | |
run: npm ci --prefer-offline --no-audit | |
- name: Prepare env | |
run: touch .env | |
- name: Restore git lfs | |
run: git lfs checkout | |
- name: Sync latest ESG data shet | |
run: ./tools/extractAll.sh | |
- name: Push latest council data | |
uses: EndBug/add-and-commit@v8 | |
with: | |
default_author: github_actions | |
message: Sync to latest ESG data | |
- name: Build ui | |
run: npm run generate | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3.8.0 | |
with: | |
DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
PUBLISH_BRANCH: gh-pages | |
PUBLISH_DIR: ./esg-ui/dist |