Builds and deploys project documentation using Docker-based builders.
The following sequence diagram illustrates the interactions and steps involved in the Writerside Documentation workflow, triggered by a push to the main branch or a workflow call.
Step 1 — Configure Necessary Secrets
a. Navigate to Repository Settings
Go to your repository on GitHub.
Click on the Settings tab.
b. Access Secrets
In the left sidebar, click on Secrets and variables under the Security section.
Select Actions to manage secrets for GitHub Actions.
c. Add Required Secrets
GITHUB_TOKEN: This token is automatically provided by GitHub Actions and typically does not need to be added manually unless you require customized permissions.
PAT_FORCE_PUSH: Personal Access Token configured with the necessary scopes (permissions) to allow a GitHub Actions workflow to perform force push operations on a repository.
Additional Secrets: If your workflow requires access to external services or APIs (e.g., authentication tokens, API keys), add them here by clicking on New repository secret and providing the necessary name and value.
name: Writerside Documentation
on:
push:
branches:
- main
jobs:
documentation:
uses: kurocado-studio/styleguide/.github/workflows/writerside-documentation@main
secrets: inherit
Step 3 — Create the Writerside Workflow File
Create a GitHub Actions workflow file that defines the steps for automated testing checks. This workflow will be triggered by pushes to the main branch or the creation/update of pull requests.
a. Add the Workflow File
In your repository, navigate to the .github/workflows/ directory. If it doesn't exist, create it.
Create a new file named writerside.yml (or any name of your choice).
b. Define the Workflow
Add the following content to the writerside.yml file:
name: Writerside Documentation
on:
push:
branches:
- main
jobs:
documentation:
uses: kurocado-studio/styleguide/.github/workflows/writerside-documentation@main
secrets: inherit
Full CI/CD Pipeline Example
#
# Made with ❤️ and adobo by Kurocado Studio
# Copyright (c) 2024. All Rights Reserved.
#
# Learn more about Kurocado Studio: {@link https://www.kurocado.studio}
#
# Explore our open-source projects: {@link https://github.com/kurocado-studio}
#
name: CI/CD Pipeline
permissions:
contents: write
id-token: write
pages: write
pull-requests: write
on:
pull_request:
push:
branches:
- main
jobs:
lint:
uses: kurocado-studio/styleguide/.github/workflows/workflow.lint.yml@main
secrets: inherit
test:
needs: lint
uses: kurocado-studio/styleguide/.github/workflows/workflow.test.yml@main
secrets: inherit
document:
needs: test
uses: kurocado-studio/styleguide/.github/workflows/workflow.document.yml@main
secrets: inherit
release:
needs: document
uses: kurocado-studio/styleguide/.github/workflows/workflow.release.yml@main
secrets: inherit
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/main'