Skip to content

infra: Fix github CI/CD artifact :octocat: #45

infra: Fix github CI/CD artifact :octocat:

infra: Fix github CI/CD artifact :octocat: #45

Workflow file for this run

name: Publish to GitHub Pages CI/CD
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
- name: Install dependencies
run: yarn install --prefer-offline
- name: Build application
run: yarn build --outDir dist
# - name: Setup Pages
# uses: actions/configure-pages@v3
# At a minimum this job should upload artifacts using actions/upload-artifact
- name: Upload Artifact Build
uses: actions/upload-artifact@v4
with:
name: github-pages
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: github-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}