Giter Site home page Giter Site logo

vuepress-deploy's Introduction

English | 简体中文

vuepress-deploy

A GitHub Action to build and deploy Vuepress sites to GitHub Pages

Usage

Create vuepress-deploy.yml in the .github/workflows directory in the root of your repository.

name: Build and Deploy
on: [push]
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@master

    - name: vuepress-deploy
      uses: jenkey2011/vuepress-deploy@master
      env:
        ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        TARGET_REPO: username/repo
        TARGET_BRANCH: master
        BUILD_SCRIPT: yarn && yarn build
        BUILD_DIR: blog/.vuepress/dist/

The action will auto deploy the vuepress project when you push your code. Enjoy!!!

Step-by-Step Guide , please see the Step-by-Step

Parameters

Parameter Description Type Required
ACCESS_TOKEN Personal access token secrets Yes
TARGET_REPO The repository you want to deploy. e.g.:jenkey2011/blog. Default: current repository env No
TARGET_BRANCH The branch you want to deploy. e.g.:gh-pages.Default: gh-pages env No
TARGET_LINK The full address of the target repo will cover TARGET_REPO for other platforms. e.g.:https://user:${{ secrets.CODING_TOKEN }}@team.coding.net/team/repo.git. env No
BUILD_SCRIPT The script to build the vuepress project. e.g.: yarn && yarn build env Yes
BUILD_DIR The output of the build-script above. e.g.: blog/.vuepress/dist/ env Yes
CNAME Alias Record of your site. env no

Step-by-Step Guide

Create a personal access token

click your profile icon > Settings > Developer settings > Personal access tokens > Generate new token > At least check repo. Then you will get a token, copy it.

For more information: https://help.github.com/en/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on

Creating encrypted secrets

Under your repository name, click Settings > Secrets > Type ACCESS_TOKEN in the "Name" input box && the the personal access token as value.

For more information: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets

Create a workflow file

If you repo doesn't already have one, create a workflow file. You must store workflows in the .github/workflows directory in the root of your repository.

In .github/workflows, add a .yml or .yaml file for your workflow. For example, .github/workflows/vuepress-deploy.yml.

For more information: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow

vuepress-deploy's People

Contributors

pentatea avatar jenkey2011 avatar ovesco avatar rednafi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.