tolking / vuepress-theme-default-prefers-color-scheme

add prefers-color-scheme for vuepress default theme
https://tolking.github.io/vuepress-theme-default-prefers-color-scheme
MIT License
50 stars 8 forks source link

Workflows #30

Closed jrappen closed 3 years ago

jrappen commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Sure, whatever works for you.