-
Notifications
You must be signed in to change notification settings - Fork 748
103 lines (86 loc) · 3.01 KB
/
manual_release_docs.yaml
File metadata and controls
103 lines (86 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Release docs
on:
# Runs when manually triggered from the GitHub UI.
workflow_dispatch:
# Runs when invoked by another workflow.
workflow_call:
inputs:
suppress_failure_notification:
description: 'When true, skips the Slack alert on failure (the caller will send its own).'
required: false
type: boolean
default: false
permissions:
contents: read
env:
NODE_VERSION: 22
PYTHON_VERSION: 3.14
jobs:
release_docs:
name: Release docs
environment:
name: github-pages
permissions:
contents: write
pages: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up uv package manager
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python dependencies
run: uv run poe install-dev
- name: Install pnpm and website dependencies
uses: apify/actions/pnpm-install@v1.1.2
with:
working-directory: website
- name: Build Docusaurus docs
run: uv run poe build-docs
env:
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}
SEGMENT_TOKEN: ${{ secrets.SEGMENT_TOKEN }}
- name: Set up GitHub Pages
uses: actions/configure-pages@v6
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./website/build
- name: Deploy artifact to GitHub Pages
uses: actions/deploy-pages@v5
- name: Invalidate CloudFront cache
run: |
gh workflow run invalidate-cloudfront.yml \
--repo apify/apify-docs-private \
--field deployment=crawlee-web
echo "✅ CloudFront cache invalidation workflow triggered successfully"
env:
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
# Send a Slack notification to the team alerting channel when there is a failure.
# Also alerts on cancellation (e.g., the `github-pages` deployment was rejected by a reviewer).
# Skipped when the workflow is invoked from a parent that sends its own alert (to avoid duplicates).
notify_on_failure:
name: Notify Slack on failure
needs: release_docs
if: (failure() || cancelled()) && !inputs.suppress_failure_notification
permissions:
contents: read
actions: read # Required for `gh api ...actions/runs/.../jobs` inside the reusable workflow.
uses: ./.github/workflows/_notify_slack_on_failure.yaml
with:
heading: ':red_circle: Docs release failed'
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}