Skip to content

tbouffard/playground-release-drafter-and-gh-pages

Repository files navigation

playground-release-drafter-and-gh-pages

Build GitHub release (latest by date including pre-releases)

Known Vulnerabilities FOSSA Status

Playground for github pages, AsciDoctor, release-drafter actions, application deployment, and much more

Mainly investigations for bpmn-visualization

AsciiDoctor and GitHub Pages

AsciiDoctor

AsciiDoctor sources are located in the docs They are used to generate the static site which is then pushed to the gh-pages branch The site is hosted on https://tbouffard.github.io/playground-release-drafter-and-gh-pages/

Html Doc generation

From the root folder of the repository, run

npm run docs

GitHub Pages

The AsciiDoctor sources are processed then pushed to the gh-pages by a dedicated workflow This workflow

  • uses the GitHub Pages action
  • commits are done by a dedicated bot user, not the github actions user
  • only runs on documentation or workflow configuration changes to avoid extra rebuild when nothing changes.

TODO:

  • tests the followings on publish gh action
    • publish_branch: gh-pages
    • commit_message: ${{ github.event.head_commit.message }}
  • setup a doc preview environment

Another workflow is also available to check build page status (TODO: to be fixed as it seems not running for now)

Documentation preview

When documentation changes on Pull Request, the GitHub workflow attaches it as an artifact of the run job.

See #21 to have a Doc Preview environment

Release-Drafter

Q&A (info based on the GitHub Action usage)

  • can I update the draft release manually (for instance, overview in the top of the content): NO, or at least not found how to do
  • is the release content is rebuilt on each run: YES, tested by removing the whole content manually or by activating the action after some PR have already been merged
  • categories from label - not found how to or if this can be configured
    • require several labels to be added in a category
    • exclude labels combinaison: for instance, PR marked as enhancement and documentation only referenced in the enhancement category and not in the documentation

Playground Vue.js App

This application is an adaptation of the VueJS quickstart to demonstrate deployment capabilities (see below)

Available resources

  • Project setup :
npm install
  • Compiles and hot-reloads for development
npm run serve
  • Compiles and minifies for production
npm run build
  • Lints and fixes files
npm run lint

Application deployments

Zeit Now

Deploy the Playground Vue.js App on commit

See examples in https://github.com/zeit/now/tree/master/examples

Configuration

Done in both Now Dashboard and now.json file

Available alternative to native GitHub integration (as of 2020-03-31) https://github.com/marketplace/actions/zeit-now-deployment

  • Let us control when/what to deploy (could be usefull for the gh-pages branch, see below)
  • do not use GH Deployment, this should have to be managed manually
  • more configuration than with the native integration

TODO

  • experiment .nowignore: for local dev only?
  • check if the build configuration/command can be put in the .nowconfig file
  • create a Now organization/team
  • deployment diff: https://zeit.co/blog/deploy-summary

Managing the gh-pages branch

Currently (as of 2020-03-31), ZEIT Now for GitHub will deploy every push by default. As the usual Now build config is an npm build, this does not work for the gh-pages which only contains static files.
Filtering of branch to deploy: see vercel/vercel#4086 and vercel/vercel#4419

Workaround Request Now to run a dedicated bash script now-build.sh which

Current caveats with Now

Based on 2020-03-31 experiments

Alternatives to be tested

Resources

Curated list of GitHub Actions: https://github.com/sdras/awesome-actions

Projects using AsciiDoctor

License

FOSSA Status