Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Docs

on:
push:
Expand Down Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Deploy to Netlify
uses: flowexec/action@v1
with:
executable: 'deploy docs:netlify ${{ github.event.inputs.environment || 'production' }}'
executable: "deploy docs:netlify ${{ github.event.inputs.environment || 'production' }}"
timeout: '5m'
flow-version: 'main'
secrets: |
Expand Down
18 changes: 16 additions & 2 deletions docs/docs.flow
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,22 @@ executables:
- envKey: NETLIFY_SITE_ID
secretRef: netlify-flow-site-id
cmd: |
# Generate deploy message from git log
COMMIT_SHA=$(git rev-parse --short HEAD)
COMMIT_MSG=$(git log -1 --pretty=%s)
BRANCH=$(git rev-parse --abbrev-ref HEAD)

# Check if branch is dirty
if ! git diff-index --quiet HEAD --; then
DIRTY=" (dirty)"
else
DIRTY=""
fi

MESSAGE="${BRANCH}@${COMMIT_SHA}${DIRTY}: ${COMMIT_MSG}"

if [ "${ENVIRONMENT}" = "production" ]; then
npx netlify-cli deploy --dir=dist --prod
npx netlify-cli deploy --dir=dist --prod --message="${MESSAGE}"
else
npx netlify-cli deploy --dir=dist
npx netlify-cli deploy --dir=dist --message="${MESSAGE}"
fi
Loading