Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

Workflows #30

Closed
jrappen opened this issue Mar 11, 2021 · 2 comments · Fixed by #31
Closed

Workflows #30

jrappen opened this issue Mar 11, 2021 · 2 comments · Fixed by #31

Comments

@jrappen
Copy link
Contributor

jrappen commented Mar 11, 2021

Workflow replacements as discussed in #28.


deploy

name: deploy

on:
  push:
    branches:
      - master
    paths:
      - 'docs/**'

jobs:
  deploy:
    runs-on: ubuntu-18.04
    steps:

      # Compare https://github.com/actions/checkout
      - name: Checkout
        uses: actions/checkout@v2
        with:
          persist-credentials: false

      - name: Build docs
        run: |
          yarn install
          vuepress build docs/ --no-cache

      # Compare https://github.com/peaceiris/actions-gh-pages
      - name: Deploy Docs
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./dist
          user_name: 'github-actions[bot]'
          user_email: 'github-actions[bot]@users.noreply.github.com'
          commit_message: 'deploy:'

test

name: test

on:
  push:
    branches:
      - dev
      - next
    paths:
      - 'docs/**'
  pull_request:
    branches:
      - master
      - dev
      - next
    paths:
      - 'docs/**'

jobs:
  test:
    runs-on: ubuntu-18.04
    steps:

      # Compare https://github.com/actions/checkout
      - name: Checkout
        uses: actions/checkout@v2
        with:
          persist-credentials: false

      - name: '[Test] Build docs'
        run: |
          yarn install
          vuepress build docs/ --no-cache

      # don't deploy
@tolking
Copy link
Owner

tolking commented Mar 12, 2021

Thanks, maybe don't need to change so much

deploy

-name: build docs
+name: deploy

on:
  push:
    branches: [ master ]
-  pull_request:
-    branches: [ master ]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2.3.1
        with:
          persist-credentials: false

      - name: Install and Build
        run: |
          npm install
          npm run build

      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@3.6.2
        with:
          GITHUB_TOKEN: ${{ secrets.page }}
          BRANCH: gh-pages
          FOLDER: dist
          CLEAN: true

test

-name: build docs
+name: test

on:
-  push:
-    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
-  build-and-deploy:
+ test-build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2.3.1
        with:
          persist-credentials: false

      - name: Install and Build
        run: |
          npm install
          npm run build

-      - name: Deploy
-        uses: JamesIves/github-pages-deploy-action@3.6.2
-        with:
-          GITHUB_TOKEN: ${{ secrets.page }}
-          BRANCH: gh-pages
-          FOLDER: dist
-          CLEAN: true

@jrappen
Copy link
Contributor Author

jrappen commented Mar 12, 2021

Sure, whatever works for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants