Skip to content

Commit bffa61e

Browse files
authored
deploy action
1 parent cbbf170 commit bffa61e

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/deploy

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy ChartJS Custom Question
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ['main']
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow one concurrent deployment
18+
concurrency:
19+
group: 'pages'
20+
cancel-in-progress: true
21+
22+
jobs:
23+
# Single deploy job since we're just deploying
24+
deploy:
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout Repository
31+
uses: actions/checkout@v4
32+
33+
- name: Set Up Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: '20'
37+
cache: 'yarn'
38+
39+
- name: Install Yarn v1
40+
run: npm install -g yarn@1
41+
42+
- name: Install Dependencies
43+
run: yarn install --frozen-lockfile
44+
45+
- name: Build Project
46+
run: yarn build
47+
48+
- name: Setup GitHub Pages
49+
uses: actions/configure-pages@v4
50+
51+
- name: Upload Artifact
52+
uses: actions/upload-pages-artifact@v3
53+
with:
54+
# Upload the 'dist' folder
55+
path: './dist'
56+
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)