Merge pull request #280 from iron-security/dependabot/github_actions/… #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- master | |
- main | |
env: | |
WEBSITE_URL: https://iron.security/ | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
uses: actions/checkout@v4 | |
- | |
uses: go-semantic-release/action@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: create deployment | |
uses: niklasmerz/github-deployment-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: -o ${{ github.repository_owner }} -r ${{ github.event.repository.name }} -c main -e production | |
- | |
name: Setup npm | |
run: npm install | |
- | |
name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
- | |
name: Build | |
run: npm run build | |
- | |
name: publish | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
command: deploy --env prd | |
- | |
name: set deployment status | |
uses: niklasmerz/github-deployment-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: -o ${{ github.repository_owner }} -r ${{ github.event.repository.name }} -s success -u ${{ env.WEBSITE_URL }} -f | |
- | |
name: set failed deployment | |
uses: niklasmerz/github-deployment-action@master | |
if: ${{ failure() }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: -o ${{ github.repository_owner }} -r ${{ github.event.repository.name }} -s failed -u ${{ env.WEBSITE_URL }} -f |