Skip to content

Commit

Permalink
ci: try github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Mar 15, 2024
1 parent 7444bf1 commit a859c99
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 11 deletions.
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ jobs:
steps:
- checkout
- yarn-install
- run: yarn dlx -p @cmflow/cli cmrelease
- run:
name: Publish
path: ./dist
command: |
git init
git add -A
git commit -m 'Deploy github pages'
git push -f "https://${GH_TOKEN}@github.com/ClubMediterranee/swagger.git" master:gh-pages
# - run: yarn dlx -p @cmflow/cli cmrelease
# - run:
# name: Publish
# path: ./dist
# command: |
# git init
# git add -A
# git commit -m 'Deploy github pages'
# git push -f "https://${GH_TOKEN}@github.com/ClubMediterranee/swagger.git" master:gh-pages
workflows:
build:
jobs:
Expand Down
4 changes: 2 additions & 2 deletions .gflowrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"flow": "gflow",
"remote": "origin",
"develop": "master",
"production": "master",
"develop": "release-v3",
"production": "release-v3",
"ignores": [],
"syncAfterFinish": false,
"postFinish": "",
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Build

on:
push:
pull_request:
branches: [release-v3]
types: [opened, synchronize, closed]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: yarn install --immutable
- run: yarn run lint
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: yarn install --immutable
- run: yarn run test

deploy:
needs: [test, lint]
if: github.event_name != 'pull_request' && contains('
refs/heads/main
refs/heads/release-v3
refs/heads/alpha
refs/heads/beta
refs/heads/rc
', github.ref)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: yarn install --immutable
- run: yarn dlx -p @cmflow/cli cmrelease
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
File renamed without changes.

0 comments on commit a859c99

Please sign in to comment.