Skip to content

Commit

Permalink
feat: build and deploy to gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ariostas committed Mar 25, 2024
1 parent 791d74c commit 3c1ab0a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: build and deploy

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install node dependencies
run: npm install
- name: Build site
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

deploy:
if: github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Training Center

[Click here for the deployed webpage](https://main--nimble-pothos-1ee962.netlify.app/)
[Click here for the deployed webpage](https://hsf-training.org)

## The project

Expand Down

0 comments on commit 3c1ab0a

Please sign in to comment.