diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f1e358f..f2052e9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Github Pages Astro CI +name: Deploy to GitHub Pages on: # Trigger the workflow every time you push to the `main` branch @@ -7,37 +7,29 @@ on: # Allows you to run this workflow manually from the Actions tab on GitHub. workflow_dispatch: - # Allow this job to clone the repo and create a page deployment +# Allow this job to clone the repo and create a page deployment permissions: contents: read pages: write id-token: write +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest steps: - - name: Check out your repository using git + - name: Checkout your repository using git uses: actions/checkout@v4 - - - name: Use Node.js 16 - uses: actions/setup-node@v3 - with: - node-version: "16" - cache: "npm" - - # Not using npm? Change `npm ci` to `yarn install` or `pnpm i` - - name: Install dependencies - run: npm ci - - # Not using npm? Change `npm run build` to `yarn build` or `pnpm run build` - - name: Build Astro - run: npm run build --if-present - - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - path: ./dist + - name: Install, build, and upload your site output + uses: withastro/action@v1 + # with: + # path: . # The root location of your Astro project inside the repository. (optional) + # node-version: 16 # The specific version of Node that should be used to build your site. Defaults to 16. (optional) + # package-manager: yarn # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) deploy: environment: