From 5c1cd30134b3391e11a2a4b1fee5cac5ab16d92c Mon Sep 17 00:00:00 2001 From: Lolipop Date: Wed, 14 Jul 2021 14:02:03 +0800 Subject: [PATCH] ci: switch to Github Actions --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ .travis.yml | 19 ------------------ 2 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/deploy.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..8898c4c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Vuepress Deployment + +on: + push: + branches: + - main + +jobs: + pages: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14.x + uses: actions/setup-node@v1 + with: + node-version: '14.x' + - name: Cache NPM dependencies + uses: actions/cache@v2 + with: + path: node_modules + key: ${{ runner.OS }}-npm-cache + restore-keys: | + ${{ runner.OS }}-npm-cache + - name: Install Dependencies + run: | + cd vuepress + npm install + - name: Build + run: | + cd vuepress + npm run build + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + deploy_key: ${{ secrets.ACCESS_TOKEN }} + publish_dir: vuepress/docs/.vuepress/dist + publish_branch: gh-pages \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4d3deb7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js -node_js: - - lts/* -branches: - only: - - main -install: - - cd vuepress - - yarn install -script: - - yarn build -deploy: - provider: pages - skip_cleanup: true - local_dir: vuepress/docs/.vuepress/dist - github_token: $CI_DEPLOY_TOKEN - keep_history: true - on: - branch: main \ No newline at end of file