Skip to content

Deploy to GitHub Pages #4

Deploy to GitHub Pages

Deploy to GitHub Pages #4

Workflow file for this run

name: Deploy to GitHub Pages
on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v2
- name: Install, build, and upload your site
uses: actions/setup-node@v2
with:
node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 16. (optional)
cache: yarn
- name: Install Deps
run: yarn
- name: Build
run: yarn build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './build'
deploy:
environment:
name: Production
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages (Main)
id: deployment
uses: actions/deploy-pages@v2