diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8ecefb9..c2e67d8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,10 +1,10 @@ -# https://github.com/actions/deploy-pages#usage name: Deploy to GitHub Pages on: workflow_dispatch: push: branches: - main + jobs: build: runs-on: ubuntu-latest @@ -28,23 +28,33 @@ jobs: NUXT_PUBLIC_BASE_URL: ${{ vars.NUXT_PUBLIC_BASE_URL }} NUXT_PUBLIC_SITE_AUTHOR: ${{ vars.NUXT_PUBLIC_SITE_AUTHOR }} NUXT_PUBLIC_BUILD_BASE_URL: ${{ vars.NUXT_PUBLIC_BUILD_BASE_URL }} - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + - name: Create ZIP artifact + run: | + zip -r web.zip ./.output/public + - name: Upload ZIP artifact + uses: actions/upload-artifact@v3 with: - path: ./.output/public - # Deployment job + name: web + path: web.zip + - name: Create GitHub Release + id: release + uses: ncipollo/release-action@v1 + with: + tag: ${{ github.sha }} + name: Release ${{ github.sha }} + body: Automated release for commit ${{ github.sha }} + draft: false + prerelease: false + files: web.zip + deploy: - # Add a dependency to the build job needs: build - # Grant GITHUB_TOKEN the permissions required to make a Pages deployment permissions: - pages: write # to deploy to Pages - id-token: write # to verify the deployment originates from an appropriate source - # Deploy to the github_pages environment + pages: write + id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - # Specify runner + deployment step runs-on: ubuntu-latest steps: - name: Deploy to GitHub Pages