Increase backend resource allocations #4672
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
lint: | |
# pull requests are a duplicate of a branch push if within the same repo. | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
# Need this to get version number from last tag | |
fetch-depth: 0 | |
- name: Set node | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
- name: Install yarn dependencies | |
uses: borales/[email protected] | |
with: | |
cmd: global add markdownlint-cli2 markdown-it-admon | |
- name: Lint with markdownlint-cli2 | |
run: > | |
markdownlint-cli2 | |
**/*.{md,markdown} | |
build: | |
# pull requests are a duplicate of a branch push if within the same repo. | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
# Need this to get version number from last tag | |
fetch-depth: 0 | |
- name: Setup python | |
uses: actions/[email protected] | |
with: | |
python-version: 3.11 | |
- name: Install docs dependencies | |
run: pip install -r docs/requirements.txt | |
- name: Set node | |
uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
- name: Generate docs | |
run: npx @techdocs/cli generate --no-docker --omitTechdocsCoreMkdocsPlugin | |
- name: Create docs artifact | |
uses: actions/[email protected] | |
with: | |
name: techdocs-common | |
path: site | |
publish_gh_pages: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get docs artifact | |
uses: actions/[email protected] | |
with: | |
name: techdocs-common | |
path: site | |
- name: Publish docs to gh-pages | |
if: github.ref == 'refs/heads/main' | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: site | |
keep_files: true | |
publish_s3: | |
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) | |
needs: build | |
strategy: | |
matrix: | |
entity: | |
- default/system/developer-portal | |
- default/component/developer-portal-backend | |
- default/component/developer-portal-frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get docs artifact | |
uses: actions/[email protected] | |
with: | |
name: techdocs-common | |
path: site | |
- name: Publish docs to s3 bucket | |
if: github.ref == 'refs/heads/main' | |
run: > | |
timeout -v 10m | |
npx @techdocs/cli publish | |
--entity ${{ matrix.entity }} | |
--publisher-type awsS3 | |
--storage-name techdocs | |
--awsEndpoint https://s3.echo.stfc.ac.uk | |
--awsS3ForcePathStyle | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.TECHDOCS_S3_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.TECHDOCS_S3_SECRET_ACCESS_KEY }} | |
AWS_REGION: "eu-west-2" |