Skip to content

website: default icons #338

website: default icons

website: default icons #338

name: Deploy Dev Docs
on:
push:
branches:
- develop
- website
paths:
- "**/*.md"
- "**/*.yaml"
- "**/*.tmpl"
- "**/*.ts"
- "**/*.scss"
- "**/*.png"
- "**/*.jpeg"
- "**/*.gif"
- "**/*.svg"
- "package.json"
workflow_dispatch:
jobs:
Deploy-Docs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ "1.23" ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# if your docs needs submodules, uncomment the following line
# submodules: true
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install Docgen
run: |
go build -v github.com/lmorg/murex/utils/docgen
- name: Build Markdown Docs
env:
DOCGEN_TARGET: vuepress
RUN_NUMBER: ${{ github.run_number }}
COMMITHASHSHORT: ${{ github.run_number }}
run: |
./docgen -panic -warning -config gen/docgen.yaml
mv -v *.md *.svg docs/
mv -v gen/vuepress docs/.vuepress
echo Lower case documents...
for f in $(find docs -type f -regex '.*?/[-_A-Z]+\..*'); do
mv -v "$f" "$(echo $f | tr '[A-Z]' '[a-z]')"
done
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: true
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Build Docs
env:
NODE_OPTIONS: --max_old_space_size=8192
NODE_ENV: DEV
run: |-
pnpm run docs:build
> docs/.vuepress/dist/.nojekyll
- name: Uppercase Key Docs
run: |-
cp -v docs/.vuepress/dist/install.html docs/.vuepress/dist/INSTALL.html
cp -v docs/.vuepress/dist/download.html docs/.vuepress/dist/DOWNLOAD.html
cp -v docs/.vuepress/dist/contributing.html docs/.vuepress/dist/CONTRIBUTING.html
- name: Deploy Docs
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET }}
AWS_DEFAULT_REGION: eu-west-1
AWS_DEFAULT_OUTPUT: json
run: |
aws s3 sync docs/.vuepress/dist s3://murex.rocks/develop --exclude "*.md" --no-progress --delete
aws cloudfront create-invalidation --distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_DEV }}" --paths "/*"