mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-03 12:10:22 +00:00
Auto publish docs
This commit is contained in:
parent
67f6287a2b
commit
0429003863
7 changed files with 65 additions and 36 deletions
22
.github/workflows/docker.yaml
vendored
22
.github/workflows/docker.yaml
vendored
|
|
@ -1,22 +0,0 @@
|
|||
name: Docker Image
|
||||
on: [push]
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Inject slug/short variables
|
||||
uses: rlespinasse/github-slug-action@v2.x
|
||||
- name: Set variables
|
||||
run: |
|
||||
echo "::set-env name=REPOSITORY::$(echo $GITHUB_REPOSITORY | tr '[A-Z]' '[a-z]')"
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v1.1.0
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ github.token }}
|
||||
registry: docker.pkg.github.com
|
||||
repository: ${{ env.REPOSITORY }}/server
|
||||
tag_with_sha: true
|
||||
tag_with_ref: true
|
||||
48
.github/workflows/publish.yaml
vendored
Normal file
48
.github/workflows/publish.yaml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Publish
|
||||
on: [push]
|
||||
jobs:
|
||||
docs:
|
||||
if: github.ref == 'refs/heads/master'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Cache SBT
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.ivy2/cache
|
||||
~/.sbt
|
||||
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Scala
|
||||
uses: olafurpg/setup-scala@v5
|
||||
- name: Build docs
|
||||
run: sbt docs/unidoc
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: JamesIves/github-pages-deploy-action@3.5.9
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: gh-pages
|
||||
FOLDER: docs/target/scala-2.13/unidoc
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Inject slug/short variables
|
||||
uses: rlespinasse/github-slug-action@v2.x
|
||||
- name: Set variables
|
||||
run: |
|
||||
echo "::set-env name=REPOSITORY::$(echo $GITHUB_REPOSITORY | tr '[A-Z]' '[a-z]')"
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v1.1.0
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ github.token }}
|
||||
registry: docker.pkg.github.com
|
||||
repository: ${{ env.REPOSITORY }}/server
|
||||
tag_with_sha: true
|
||||
tag_with_ref: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue