Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Workflow file for this run

---
on:
push:
branches:
- main
pull_request:
jobs:
book:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download mdBook
run: |
set +x
version="v0.4.40"
cd /tmp
archive="mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz"
wget "https://github.com/rust-lang/mdBook/releases/download/v0.4.40/${archive}"
tar xzvf "${archive}"
sudo mv mdbook /usr/bin
mdbook --version
- name: Build
run: mdbook build
- name: Publish to Cloudflare Pages
id: publish
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: e532cde53d2aaf233bc8f913f31a325f
command: pages deploy book --project-name=ms-wiki-test
- name: View context attributes
uses: actions/github-script@v7
with:
script: console.log(context)
- name: Add preview comment to PR
if: github.event_name = "pull_request"

Check failure on line 50 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 50, Col: 13): Unexpected symbol: '='. Located at position 19 within expression: github.event_name = "pull_request"
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '✨ you may preview these changes at <${{ steps.publish.outputs.deployment-url }}>'
})