From 3c1ab0a9e5a0d35918e39e20601f0990a3b7d30f Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Mon, 25 Mar 2024 09:57:41 -0400 Subject: [PATCH 1/2] feat: build and deploy to gh pages --- .github/workflows/build-and-deploy.yml | 48 ++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-and-deploy.yml diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 0000000..f560af1 --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -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 \ No newline at end of file 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 From fbd4c179ea808d7667bacb5918f81b6a4a194f9a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 14:01:37 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/build-and-deploy.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index f560af1..d75b2a9 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -1,5 +1,4 @@ name: build and deploy - on: push: branches: @@ -8,11 +7,9 @@ on: branches: - main workflow_dispatch: - concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true - jobs: build: runs-on: ubuntu-latest @@ -31,7 +28,6 @@ jobs: uses: actions/upload-pages-artifact@v3 with: path: ./public - deploy: if: github.event_name == 'push' needs: build @@ -45,4 +41,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4