Deploy #14903
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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '*/5 * * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ${{ matrix.os }} | |
env: | |
VITE_HCAPTCHA_SITE_KEY: ${{secrets.VITE_HCAPTCHA_SITE_KEY}} | |
VITE_BACKEND_URL: ${{secrets.VITE_BACKEND_URL}} | |
GOOGLE_SERVICE_ACCOUNT_EMAIL: ${{secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL}} | |
GOOGLE_PRIVATE_KEY: ${{secrets.GOOGLE_PRIVATE_KEY}} | |
RESULT_SPREADSHEET_ID: ${{secrets.RESULT_SPREADSHEET_ID}} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [16] | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@master | |
- name: Setup node env π | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'yarn' | |
- name: Install dependencies π¨π»βπ» | |
run: yarn install --frozen-lockfile | |
- name: Fetch result π° | |
run: yarn fetch:result | |
- name: Build production π§ | |
run: yarn build | |
- name: Deploy π‘ | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
force_orphan: true |