Skip to content

Commit 9ec44df

Browse files
committed
attempt a proper actions deployment
1 parent 233312a commit 9ec44df

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- gh-pages
7+
8+
jobs:
9+
build:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v6
16+
17+
- name: Set up Node
18+
uses: yettoapp/actions/setup-languages@main
19+
with:
20+
node: true
21+
22+
- name: Build static files
23+
run: npm run compile
24+
25+
- name: Upload static files as artifact
26+
id: deployment
27+
uses: actions/upload-pages-artifact@v3
28+
with:
29+
path: dist/
30+
31+
deploy:
32+
name: Deploy
33+
needs: build
34+
runs-on: ubuntu-latest
35+
36+
if: github.ref == 'refs/heads/gh-pages'
37+
38+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
39+
permissions:
40+
pages: write # to deploy to Pages
41+
id-token: write # to verify the deployment originates from an appropriate source
42+
43+
# Deploy to the github-pages environment
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
},
55
"[json]": {
66
"editor.defaultFormatter": "vscode.json-language-features"
7+
},
8+
"[github-actions-workflow]": {
9+
"editor.defaultFormatter": "redhat.vscode-yaml"
710
}
811
}

0 commit comments

Comments
 (0)