Skip to content

Commit

Permalink
docs: update favicon and improve deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
B4nan committed Nov 7, 2023
1 parent 157e24e commit 72fdbd8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
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: ./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

0 comments on commit 72fdbd8

Please sign in to comment.