Skip to content

Update and deploy

Update and deploy #446

Workflow file for this run

name: Update and deploy
on:
workflow_dispatch:
push:
branches: [main]
paths-ignore:
- README.md
schedule:
- cron: "00 1 * * *"
permissions:
id-token: write
contents: write
jobs:
deploy:
environment: azure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: "Az login"
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: "Get all Policy Aliases"
uses: azure/powershell@v1
with:
inlineScript: |
./src/ps1/Get-AzResourcePolicyAliases.ps1
azPSVersion: "latest"
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.113.0"
extended: true
- name: Build Hugo site
run: hugo
- name: "List generated contents"
run: |
ls content
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: policyalias.mats.codes
commit_message: "docs: update and publish (${{ github.event_name }})"