-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (55 loc) · 1.77 KB
/
deploy-github-pages.yml
File metadata and controls
69 lines (55 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Deploy GitHub Pages
on:
push:
branches:
- main
# Allows running this workflow manually from the Actions tab.
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages.
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent run, skipping runs queued between the run
# in-progress and latest queued. However, don't cancel in-progress runs as it's
# fine to let them complete, and this way we have fewer reports of canceled
# runs.
concurrency:
group: deploy-github-pages
cancel-in-progress: false
jobs:
deploy-github-pages:
# Only run this job on the original repository! To run this on your fork,
# update or remove the line below.
if: github.repository == 'code-chronicles-code/react-rock-paper-scissors'
environment:
name: deploy-github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
# TODO: replace with latest, it was causing some Yarn checksum issues recently though
node-version: 22.6.0
cache: yarn
cache-dependency-path: ./yarn.lock
- name: Install dependencies
run: yarn --immutable
shell: bash
- name: Build app
run: yarn build
env:
NODE_ENV: production
PUBLIC_URL: /react-rock-paper-scissors/
- name: Set up Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4