Skip to content

Commit

Permalink
Pages CICD
Browse files Browse the repository at this point in the history
  • Loading branch information
lawfulstupid committed Dec 23, 2024
1 parent f06f07c commit 9dd44f0
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Page Deploy

env:
NODE_VERSION: '20'

on:
push:
branches:
- master

permissions:
id-token: write
contents: write
pages: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@master
with:
node-version: ${{ env.NODE_VERSION }}
- name: Code build
run: |
npm install
npm run build
- name: Set up pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"author": "",
"license": "ISC",
"description": "",
"scripts": {
"build": "npx tsc"
},
"devDependencies": {
"@types/node": "^22.10.2",
"ts-node": "^10.9.2",
Expand Down

0 comments on commit 9dd44f0

Please sign in to comment.