Skip to content

Resolve issues on workflows #22

Resolve issues on workflows

Resolve issues on workflows #22

Workflow file for this run

# SPDX-FileCopyrightText: Jürgen Mülbert
#
# SPDX-License-Identifier: MIT
#
# Sample workflow for building and deploying an Astro site to GitHub Pages
#
# To get started with Astro see: https://docs.astro.build/en/getting-started/
#
name: Deploy Astro site to Pages
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
on: # yamllint disable-line rule:truthy
push:
branches: [main, develop, release]
pull_request:
# The branches below must be a subset of the branches above
types: [opened, synchronize, reopened]
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
# Skip any PR created by dependabot to avoid permission issues:
if: (github.actor != 'dependabot[bot]')
steps:
- name: 🧰 Checkout Source Code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Build and Upload Site
uses: withastro/action@acfe56dffc635abfb9506c77d51ce097030360d1 # v2.0.0
with:
path: ./pages
# The 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: pnpm@latest
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
# https://github.com/marketplace/actions/alls-green#wh
release-all-green: # This job does nothing and is only used for the branch protection
if: always()
needs:
- build
- deploy
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@223e4bb7a751b91f43eda76992bcfbf23b8b0302 # v1.2.2
with:
jobs: ${{ toJSON(needs) }}