diff --git a/.github/workflows/deploy_github_pages.yaml b/.github/workflows/deploy_github_pages.yaml new file mode 100644 index 0000000..cf49ca4 --- /dev/null +++ b/.github/workflows/deploy_github_pages.yaml @@ -0,0 +1,46 @@ +name: CD Github Pages + +on: + push: + branches: [main] + +permissions: + contents: write + +jobs: + build-and-deploy: + concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./web_frontend + + strategy: + matrix: + node-version: [20.x] + + # env: + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install yarn + run: npm install --global yarn + + - name: Install dependencies + run: yarn install --pure-lockfile + + # Build + - name: Build project + run: yarn nuxi generate + + # Deploy + - name: Deploy to Github Pages 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: .output/public # The folder the action should deploy.