Skip to content

Commit

Permalink
chore: Deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsahaj committed May 10, 2024
1 parent f15060f commit bac6e47
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy to GitHub Pages

on:
push:
branches: [main]
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 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:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Install deps
run: npm install

- name: Build website
run: npm run build

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: github-pages
path: ./dist

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"scripts": {
"dev": "webpack-cli serve --mode=development --env development --hot",
"build": "webpack --mode=production --env production --progress",
"build": "npm run build:wasm; webpack --mode=production --env production --progress",
"build:wasm": "cd altr-wasm && wasm-pack build --target web --out-dir pkg",
"lint": "eslint './src/**/*.{ts,tsx,js,jsx}'",
"lint:fix": "eslint './src/**/*.{ts,tsx,js,jsx}' --fix"
Expand Down Expand Up @@ -42,6 +42,7 @@
"ts-node": "10.9.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "4.9.5",
"wasm-pack": "^0.12.1",
"webpack": "5.89.0",
"webpack-cli": "4.10.0",
"webpack-dev-server": "4.15.1"
Expand Down

0 comments on commit bac6e47

Please sign in to comment.