Skip to content

Merge pull request #137 from SolaceLabs/change-url #108

Merge pull request #137 from SolaceLabs/change-url

Merge pull request #137 from SolaceLabs/change-url #108

Workflow file for this run

name: Release
on:
# # for testing
# workflow_dispatch:
push:
branches: ["main"]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
permissions:
contents: write # to create release
issues: write # to post issue comments
pull-requests: write # to create pull request
name: Release
runs-on: ubuntu-20.04
steps:
- name: Check Auth
if: github.event_name == 'workflow_dispatch'
run: |
echo "not authorized"
echo '::set-output name=IS_AUTHORIZED::false'
id: auth
- name: Cancel Workflow
if: ${{ always() && steps.auth.outputs.IS_AUTHORIZED == 'false' }}
uses: andymckay/cancel-action@0.2
- name: Check out code
uses: actions/checkout@v3
# with:
# # ref: ${{ github.ref }}
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
# registry-url: 'https://registry.npmjs.org'
- name: Setup Python Environment
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/devel/docs.requirements.txt
- name: Build
run: |
yarn install --frozen-lockfile
yarn build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn publish:packages
version: yarn version:packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Make Docs
run: |
./docs/make.sh
- name: Publish Docs
run: |
git fetch origin gh-pages
git worktree add gh-pages gh-pages
date > generated.txt
git config user.name github-actions
git config user.email github-actions@github.com
rsync -av ./docs/build/html/ gh-pages/
cd gh-pages
git add -A
git commit --allow-empty -F ../generated.txt
# git push -f -u origin gh-pages
git push -u origin gh-pages