Skip to content

Commit 17db49e

Browse files
committed
Create deploy-to-github-pages.yml
1 parent 49b9b59 commit 17db49e

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: [main]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow one concurrent deployment
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: true
22+
23+
env:
24+
# Hosted GitHub runners have 7 GB of memory available, let's use 6 GB
25+
NODE_OPTIONS: --max-old-space-size=6144
26+
27+
jobs:
28+
# Single deploy job since we're just deploying
29+
deploy:
30+
environment:
31+
name: github-pages
32+
url: ${{ steps.deployment.outputs.page_url }}
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v3
37+
- name: Set up Node.js
38+
uses: actions/setup-node@v3
39+
with:
40+
node-version: 16.x
41+
cache: yarn
42+
- name: Install dependencies
43+
run: yarn install --frozen-lockfile --non-interactive
44+
- name: Build
45+
run: yarn build
46+
- name: Setup Pages
47+
uses: actions/configure-pages@v3
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v2
50+
with:
51+
# Upload entire repository
52+
path: build
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)