Update site.yml (#2674)

* Update site.yml

* Update site.yml
This commit is contained in:
Jonathan Ho
2022-12-02 11:55:38 -06:00
committed by GitHub
parent 5381e0e3f7
commit 41d9ec4025
+28 -10
View File
@@ -13,24 +13,42 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./site
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
# Runs a set of commands using the runners shell
- name: Run a multi-line script
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Build website
run: |
echo Add other actions to build,
echo test, and deploy your project.
npm ci
npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./site/build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1