From 56e82bdfdbc275a7973837dfb901297ed5bd5fe2 Mon Sep 17 00:00:00 2001 From: pauchena Date: Fri, 19 Apr 2024 10:53:38 -0300 Subject: [PATCH] Add gh pages workflow --- .github/workflows/gh-deployment.yml | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/gh-deployment.yml diff --git a/.github/workflows/gh-deployment.yml b/.github/workflows/gh-deployment.yml new file mode 100644 index 0000000..21b2f55 --- /dev/null +++ b/.github/workflows/gh-deployment.yml @@ -0,0 +1,39 @@ +name: Deployment to GitHub Pages + +permissions: + contents: write + +on: + # call this workflow when the workflow Main Validation is completed after a push to main + workflow_run: + workflows: + - 'Continuous Integration' + branches: + - main + types: + - completed + +jobs: + deploy: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + steps: + - name: Begin CI... + uses: actions/checkout@v3 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version-file: .node-version + + - name: Install dependencies + run: npm install + + - name: Build page + run: npm run build + + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist