Skip to content

deploy

deploy #731

Workflow file for this run

name: deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
# TODO: pull node version from .node-version file
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "yarn"
- run: yarn install
- run: yarn build
- uses: actions/upload-pages-artifact@v2
with:
path: "dist/"
deploy:
if: ${{ github.event_name != 'pull_request' }}
needs: [build]
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
e2e:
needs: [deploy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cypress-io/github-action@v6
with:
browser: chrome
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: cypress/videos