diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2270d32d..d8901c2a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,8 +2,8 @@ name: Deploy Next.js to GitHub Pages on: push: - branches: - - main # Change this to your default branch if different + tags: + - '*' permissions: contents: write @@ -26,8 +26,16 @@ jobs: run: | echo NEXT_PUBLIC_API_URL=https://nist-sp-800-171.neal.codes >> .env + - name: Retrieve the cached "node_modules" directory (if present) + uses: actions/cache@v2 + id: node-cache + with: + path: ./client/node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }} + - name: Install dependencies run: npm install + if: steps.node-cache.outputs.cache-hit != 'true' working-directory: ./client - name: Build App @@ -39,4 +47,9 @@ jobs: with: cname: nist-sp-800-171.neal.codes github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./client/out # This is the default output directory for `next export` \ No newline at end of file + publish_dir: ./client/out # This is the default output directory for `next export` + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + generate_release_notes: true \ No newline at end of file