This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
state convert blog (#3428) #2856
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: Push | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
# Only run this step on the upstream repo. | |
if: github.repository == 'pulumi/pulumi-hugo' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "18.x" | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19.x | |
- name: Install Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: "0.111.0" | |
extended: true | |
- name: Check out branch | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.PULUMI_BOT_TOKEN }} | |
- name: Fetch the latest pulumi/registry | |
run: | | |
hugo mod get github.com/pulumi/registry/themes/default | |
hugo mod tidy | |
- name: Build assets | |
run: | | |
make ensure build-assets | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Commit artifacts | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
file_pattern: theme/default/assets/js/bundle.js theme/default/assets/js/marketing.js theme/default/assets/css/bundle.css theme/default/assets/css/marketing.css | |
commit_message: Commit asset bundles | |
- name: Commit any changes to go.mod/go.sum | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
file_pattern: go.* | |
commit_message: Update go.mod | |
notify: | |
if: failure() | |
name: Send slack notification | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Slack Notification | |
uses: docker://sholung/action-slack-notify:v2.3.0 | |
env: | |
SLACK_CHANNEL: docs-ops | |
SLACK_COLOR: "#F54242" | |
SLACK_MESSAGE: "build failure in pulumi-hugo repo :meow_sad:" | |
SLACK_USERNAME: hugobot | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_ICON: https://www.pulumi.com/logos/brand/avatar-on-white.png |