fix: baseUrl for website #30
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: 'CI' | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install | |
continue-on-error: false | |
run: yarn install --immutable --immutable-cache --check-cache | |
- name: Cache Save Node Modules | |
continue-on-error: false | |
id: cache-save | |
uses: actions/cache/save@v4 | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-nodeModules-lib | |
- name: Test | |
continue-on-error: false | |
run: yarn test | |
- name: Build Library | |
continue-on-error: false | |
run: yarn build | |
- name: Upload Artifacts for Library | |
uses: actions/upload-artifact@v4 | |
with: | |
name: library | |
path: ./dist | |
retention-days: 1 | |
build-doc: | |
if: contains(github.ref, '/main') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install | |
continue-on-error: false | |
run: | | |
cd website | |
yarn install --immutable --immutable-cache --check-cache | |
- name: Cache Save Node Modules | |
continue-on-error: false | |
id: cache-save | |
uses: actions/cache/save@v4 | |
with: | |
path: ./website/node_modules | |
key: ${{ runner.os }}-nodeModules-doc | |
- name: Build | |
continue-on-error: false | |
run: yarn predeploy | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: doc | |
path: ./website/build | |
retention-days: 1 | |
deploy: | |
needs: build | |
if: contains(github.ref, '/main') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Download Artifacts for Library | |
continue-on-error: false | |
uses: actions/download-artifact@v4 | |
with: | |
name: library | |
path: ./dist | |
- name: Cache Restore Node Modules | |
continue-on-error: false | |
id: cache-restore | |
uses: actions/cache/restore@v4 | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-nodeModules-lib | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: yarn semantic-release | |
deploy-doc: | |
needs: [deploy, build-doc] | |
if: contains(github.ref, '/main') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Download Artifacts for Library | |
continue-on-error: false | |
uses: actions/download-artifact@v4 | |
with: | |
name: doc | |
path: ./website/build | |
- name: Cache Restore Node Modules | |
continue-on-error: false | |
id: cache-restore | |
uses: actions/cache/restore@v4 | |
with: | |
path: ./website/node_modules | |
key: ${{ runner.os }}-nodeModules-doc | |
- name: Deploy to GitHub Pages | |
continue-on-error: false | |
uses: Cecilapp/GitHub-Pages-deploy@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
email: ann.bystrova96@mail.ru | |
build_dir: website/build |