Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update favicon and improve deployment workflow #250

Merged
merged 1 commit into from
Nov 7, 2023
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
45 changes: 25 additions & 20 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,29 @@ on:
push:
branches:
- master
- docs-v2
workflow_dispatch:

jobs:
build:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
environment:
name: github-pages
permissions:
contents: write
pages: write
id-token: write
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4
with:
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
- name: Use Node.js 18
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v4
with:
node-version: 18

- name: Set git identity
run: |
git config --global user.name "Martin Adámek"
git config --global user.email "[email protected]"

# - name: Cache node_modules
# uses: actions/cache@v2
# with:
# path: '**/node_modules'
# key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Build & deploy docs
- name: Build docs
run: |
# install project deps
npm ci --force
Expand All @@ -52,11 +46,22 @@ jobs:
- name: Commit the updated package(-lock).json
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: Automatic theme updating workflow [skip ci]'
file_pattern: 'website/package*.json'
commit_user_name: Apify Bot
commit_user_email: [email protected]
commit_author: Apify Bot <[email protected]>
commit_message: 'chore: Automatic theme updating workflow [skip ci]'
file_pattern: 'website/package*.json'
commit_user_name: Apify Bot
commit_user_email: [email protected]
commit_author: Apify Bot <[email protected]>

- name: Set up GitHub Pages
uses: actions/configure-pages@v3

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./website/build

- name: Deploy artifact to GitHub Pages
uses: actions/deploy-pages@v2

- name: Invalidate CloudFront cache
run: gh workflow run invalidate.yaml --repo apify/apify-docs-private
Expand Down
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
trailingSlash: false,
organizationName: 'apify',
projectName: 'apify-sdk-js',
favicon: 'img/favicon.ico',
favicon: 'img/favicon.svg',
onBrokenLinks:
/** @type {import('@docusaurus/types').ReportingSeverity} */ ('warn'),
onBrokenMarkdownLinks:
Expand Down