diff --git a/.github/workflows/deploy_static.yml b/.github/workflows/deploy_static.yml index 8ec43a8..d7ad95f 100644 --- a/.github/workflows/deploy_static.yml +++ b/.github/workflows/deploy_static.yml @@ -5,7 +5,7 @@ name: Deploy Svelte static site to GitHub Pages on: # Runs on pushes targeting the default branch push: - branches: ["master"] + branches: "master" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -23,27 +23,27 @@ concurrency: jobs: # Single deploy job since we're just deploying - build: + build_site: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3.3.0 - - name: Configure GitHub Pages - uses: actions/configure-pages@v3.0.4 - with: - # Optional static site generator to attempt to configure: "nuxt", "next", "gatsby", or "sveltekit" - static_site_generator: sveltekit - - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 with: - node-version: 18 - cache: 'npm' + node-version: 20 + cache: npm + - name: Install and Build + env: + BASE_PATH: '/${{ github.event.repository.name }}' run: | npm ci npm run build + - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@v1.0.7 + uses: actions/upload-pages-artifact@v3 with: # Artifact name name: github-pages @@ -53,11 +53,13 @@ jobs: retention-days: 1 deploy: + needs: build_site runs-on: ubuntu-latest + environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - needs: build + steps: - name: Deploy to GitHub Pages id: deployment