diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0d59f63..27666a3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,42 +1,42 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - name: Deploy to GitHub Pages - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] +on: + workflow_dispatch: + push: + branches: + - main jobs: build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x, 20.x, 22.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - - name: Checkout repository + - name: Checkout 🛎️ uses: actions/checkout@v4 - - - name: Setup Node.js + + - name: Setup Node 🔮 uses: actions/setup-node@v4 - with: - node-version: '22' - cache: 'npm' + with: + node-version: "20" - - name: Install dependencies + - name: Install dependencies 📦 run: npm install - - name: Build project + - name: Build project 🔧 run: npm run build - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist + - name: Upload artifact ☁️ + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4