replace cta hero HP (#2496) #203
This file contains hidden or 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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-publish | |
cancel-in-progress: true | |
jobs: | |
index-doc: | |
name: Build and publish production | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkouts | |
uses: actions/checkout@v4 | |
- name: Set up Node via nvm | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run pages:build | |
- name: Publish using wrangler | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }} | |
command: pages deploy dist --project-name=kestra-io | |
# Optional: Enable this if you want to have GitHub Deployments triggered | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
- name: trigger docs & blogs deployment | |
run: curl --parallel --max-time 200 https://kestra.io/docs -o docs.html https://kestra.io/blogs -o blogs.html | |
- name: Check docs.html for HTTP 524 errors | |
run: | | |
if grep -q "error code: 524" docs.html; then | |
echo "HTTP 524 error found in docs.html" | |
exit 1 | |
fi | |
- name: Check blogs.html for HTTP 524 errors | |
run: | | |
if grep -q "error code: 524" blogs.html; then | |
echo "HTTP 524 error found in blogs.html" | |
exit 1 | |
fi | |
- name: Check docs.html contains the expected content | |
run: | | |
if ! grep -q "What is Kestra?" docs.html; then | |
echo "Expected content not found in docs.html" | |
exit 1 | |
fi | |
- name: Check blogs.html contains the expected content | |
run: | | |
if ! grep -q "All things Kestra" blogs.html; then | |
echo "Expected content not found in blogs.html" | |
exit 1 | |
fi | |
- name: upload docs.html to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs.html | |
path: docs.html | |
- name: upload blogs.html to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: blogs.html | |
path: blogs.html |