update #12
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
# Manually pull latest data, build the site, and commit. | |
name: update | |
on: | |
workflow_dispatch: | |
env: | |
DRIVE_CREDENTIALS: ${{ secrets.DRIVE_CREDENTIALS }} | |
NODE_ENV: CI | |
PORT: 3000 | |
permissions: | |
contents: write | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
environment: | |
name: 'Production' | |
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: Install dependencies | |
run: npm ci | |
# - name: Update bibliography | |
# run: node bin/updateBibliography.js | |
# - name: Update database | |
# run: node bin/updateDatabase.js | |
- name: Build app | |
run: npm run build | |
# - name: Check for "only" in tests | |
# run: npm run stop-only | |
# - name: Run E2E tests | |
# run: npm test | |
- name: Commit changes | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Update data" | |
git push | |
- name: Increment version | |
run: | | |
npm version minor | |
git push | |
git push --tags |