Skip to content

fix(docs): adds back secrets.GITHUB_TOKEN #11

fix(docs): adds back secrets.GITHUB_TOKEN

fix(docs): adds back secrets.GITHUB_TOKEN #11

Workflow file for this run

name: Build and Deploy Writerside Documentation
on:
push:
branches: ['main'] # Trigger the workflow on push to the main branch
workflow_dispatch: # Allow manual triggering of the workflow
permissions:
id-token: write
pages: write
env:
INSTANCE: Writerside/docs # Adjust instance to reflect Writerside module and product
ARTIFACT: webHelpDocs-all.zip # Adjust artifact name if needed
DOCKER_VERSION: 242.21870 # Correct Docker version as per Writerside setup
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Pull Writerside Docker image
run: docker pull registry.jetbrains.team/p/writerside/builder/writerside-builder:${{ env.DOCKER_VERSION }}
- name: Build Writerside Documentation
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}
- name: Upload artifact for deployment
uses: actions/upload-artifact@v4
with:
name: docs
path: |
artifacts/${{ env.ARTIFACT }}
retention-days: 7
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write # Permissions to publish to GitHub Pages
id-token: write
steps:
- name: Download artifact for deployment
uses: actions/download-artifact@v4
with:
name: docs
- name: Unzip artifact
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir
- name: Configure GitHub Pages
uses: actions/configure-pages@v4
- name: Upload artifact to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: dir
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4