crystal-lang / crystal-book

Crystal reference with language specification, manuals and learning materials
https://crystal-lang.org/reference
Other
395 stars 248 forks source link

Run `deploy config` workflow only when a release branch is created #739

Closed straight-shoota closed 9 months ago

straight-shoota commented 9 months ago

There's no need to regenerate config every time a new branch is created. Only release branches are relevant. Other branches do not deploy.

netlify[bot] commented 9 months ago

Deploy Preview for crystal-book ready!

Name Link
Latest commit 64eb24decf73969109a9b49e3aa8b658355eb2f6
Latest deploy log https://app.netlify.com/sites/crystal-book/deploys/65ad3e9aa782b00008692858
Deploy Preview https://deploy-preview-739--crystal-book.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

oprypin commented 9 months ago

Woops it seems this pull request may have broken the workflow, no idea why, everything looks correct :/

https://github.com/oprypin/crystal-book/actions/runs/7669055161

    if: github.repository == 'crystal-lang/crystal-book' && startsWith(github.ref_name, "release/")

The workflow is not valid. .github/workflows/deploy-config.yml (Line: 9, Col: 9): Unexpected symbol: '"release/"'. Located at position 81 within expression: github.repository == 'crystal-lang/crystal-book' && startsWith(github.ref_name, "release/")

oprypin commented 9 months ago

It appears that double quotes are not valid in github syntax

straight-shoota commented 9 months ago

Ah right. That's one of those weird quirks in the syntax 🤦