マーカーとテキストの間隔を調整 (#391) #1026
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: build | |
on: | |
push: | |
branches: [master] | |
tags: ['*'] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['18.x'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: modules-cache-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
- run: yarn install | |
- run: yarn lint | |
- run: yarn test | |
- run: yarn build | |
- name: save the built | |
uses: actions/upload-artifact@v3 | |
if: "!failure()" | |
with: | |
retention-days: 1 | |
name: the-built | |
path: | | |
dist/ | |
docs/ | |
gh-pages: | |
name: 'Host with GitHub Pages' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
if: ${{ github.ref == 'refs/heads/master' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Clean repo | |
run: | | |
git checkout --orphan gh-pages | |
git rm -rf . > /dev/null 2>&1 | |
- name: load the built | |
uses: actions/download-artifact@v3 | |
with: | |
name: the-built | |
- name: Setup and deploy Github Pages | |
run: | | |
rm -rf dist | |
mv docs/* . | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git add . > /dev/null 2>&1 | |
git commit -m "Deploy" > /dev/null 2>&1 | |
git push --force origin gh-pages | |
publish: | |
name: 'Publish npm package' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
tag_name: 'v%s' | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@geolonia' | |
- name: load the built | |
uses: actions/download-artifact@v3 | |
with: | |
name: the-built | |
- name: 'Publish to NPM (latest)' | |
if: "!contains(github.ref, '-pre.')" | |
run: npm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: 'Publish to NPM (next)' | |
if: "contains(github.ref, '-pre.')" | |
run: npm publish --access=public --tag=next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: 'Checkout geolonia/cdn.geolonia.com' | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PAT_FOR_CDN_GEOLONIA_COM }} | |
repository: geolonia/cdn.geolonia.com | |
path: ./cdn.geolonia.com | |
- name: 'Build Embed API' | |
run: npm run build:embed | |
working-directory: ./cdn.geolonia.com | |
- name: 'Create PR in geolonia/cdn.geolonia.com' | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.PAT_FOR_CDN_GEOLONIA_COM }} | |
path: ./cdn.geolonia.com | |
title: "Release @geolonia/embed" | |
body: | | |
Release @geolonia/embed | |
https://github.com/geolonia/embed の GitHub Actions によって自動作成 | |
labels: 🚀♻️リリース定期タスク | |
reviewers: keichan34 |