A GitHub Action to deploy a static site on GitHub Pages.
name: GitHub Pages deploy
on:
push:
branches:
- master
jobs:
checkout-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@master
env:
EMAIL: arnaud@ligny.org
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BUILD_DIR: _site
If you get the following fatal error that means you forgot to create the requires access token (see configuration): fatal: could not read Username for 'https://github.com': No such device or address
.
EMAIL
(required): A - verified - emailGH_TOKEN
(required): A Personal Access Tokens stored in theACCESS_TOKEN
project SecretBUILD_DIR
(required): Where static/public files are (_site
by default)CNAME
: The custom domain name (ie:narno.com
)JEKYLL_SITE
: SetYES
in case of a Jekyll site (NO
by default)
GitHub Pages deploy is a free software distributed under the terms of the MIT license.