Skip to content

Fix embedded package panic #18354

Fix embedded package panic

Fix embedded package panic #18354

Workflow file for this run

---
name: Docs
on:
pull_request:
types:
- unlabeled # if GitHub Actions stuck, add and remove "not ready" label to force rebuild
- opened
- reopened
- synchronize
push:
branches:
- main
- main-*
- releases/*
schedule:
- cron: "12 0 * * *"
# Do not run this workflow in parallel for any PR change or branch push
# to prevent concurrent deployments to GitHub Pages.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: false
env:
GOPATH: /home/runner/go
GOCACHE: /home/runner/go/cache
GOLANGCI_LINT_CACHE: /home/runner/go/cache/lint
GOMODCACHE: /home/runner/go/mod
GOPROXY: https://proxy.golang.org
GOTOOLCHAIN: local
jobs:
build:
name: Build docs
runs-on: ubuntu-22.04
timeout-minutes: 10
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'not ready')
steps:
# TODO https://github.com/FerretDB/github-actions/issues/211
- name: Checkout code
uses: actions/checkout@v4
with:
lfs: true
# This step will fail with "Error: Resource not accessible by integration"
# while trying to add label and comment to PR, that is not possible for PRs from forks.
# See https://github.com/ppremk/lfs-warning/issues/147.
# But the real issue will be right above that message: a list of files that should be added using Git LFS.
- name: Check LFS status
uses: ppremk/lfs-warning@v3.3
with:
filesizelimit: 102400b
labelName: use-git-lfs
exclusionPatterns: |
**/*.js
**/*.md
**/go.sum
- name: Setup Go
uses: FerretDB/github-actions/setup-go@main
with:
cache-key: docs
- name: Install Task
run: go generate -x
working-directory: tools
- name: Build tools
run: bin/task env-pull
- name: Build docs
run: bin/task docs
- name: Create directory
run: mkdir tmp
- name: Archive docs
run: >
tar --directory website/build
--file tmp/docs.tar
--create
--verbose
.
# it has to be exactly "docs.tar" for actions/deploy-pages below
- name: Upload archive artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: tmp/docs.tar
retention-days: 1
if-no-files-found: error
- name: Check dirty
run: |
git status
git diff --exit-code
github:
name: Deploy to GitHub Pages
runs-on: ubuntu-22.04
timeout-minutes: 10
# exclude pull_request and schedule
needs: build
if: github.event_name == 'push'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
with:
artifact_name: docs
timeout: 300000 # 5*60*1000 milliseconds