diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 0000000..d75b2a9 --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,44 @@ +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 diff --git a/README.md b/README.md index 9a0ea2b..392c811 100644 --- a/README.md +++ b/README.md @@ -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