Fix env vars #155
This file contains hidden or 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 | |
paths: | |
- 'workspaces/**' | |
- '!workspaces/functions/**' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.18.1' | |
cache: 'yarn' | |
- name: Install xvfb (Virtual Display) # puppeteer needs that | |
run: sudo apt-get install -y xvfb | |
- name: Install dependencies | |
run: yarn | |
- name: Generate opengraph | |
run: env NEXT_PUBLIC_HYGRAPH_URL=${{ env.HYGRAPH_URL }} yarn workspace @teimurjan/website generate-opengraph:ci | |
- name: Generate resume | |
run: env NEXT_PUBLIC_HYGRAPH_URL=${{ env.HYGRAPH_URL }} yarn workspace @teimurjan/website generate-resume | |
- name: Build | |
run: env NEXT_PUBLIC_HYGRAPH_URL=${{ env.HYGRAPH_URL }} yarn workspace @teimurjan/website build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./workspaces/website/out |