Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add workflows #2

Merged
merged 4 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build

on:
pull_request:

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
uses: diplodoc-platform/docs-build-action@v2
with:
revision: "pr-${{ github.event.pull_request.number }}"
src-root: "./docs"
storage-endpoint: ${{ vars.DIPLODOC_STORAGE_ENDPOINT }}
storage-region: ${{ vars.DIPLODOC_STORAGE_REGION }}
storage-bucket: ${{ secrets.DIPLODOC_STORAGE_BUCKET }}
storage-access-key-id: ${{ secrets.DIPLODOC_ACCESS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DIPLODOC_SECRET_ACCESS_KEY }}
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: "Check is DIPLODOC_STORAGE_BUCKET secret exists"
env:
storage-bucket: ${{ secrets.DIPLODOC_STORAGE_BUCKET }}
if: ${{ env.storage-bucket == '' }}
run: 'echo "::error:: The secret \"DIPLODOC_STORAGE_BUCKET\" has not been made; please check that all necessary secrets and variables are installed or follow the link https://diplodoc.com/quickstart" && exit 1'
- name: Checkout
uses: actions/checkout@v3
- name: Build
uses: diplodoc-platform/docs-build-action@v2
with:
revision: "${{ github.sha }}"
src-root: "./docs"
storage-endpoint: ${{ vars.DIPLODOC_STORAGE_ENDPOINT }}
storage-region: ${{ vars.DIPLODOC_STORAGE_REGION }}
storage-bucket: ${{ secrets.DIPLODOC_STORAGE_BUCKET }}
storage-access-key-id: ${{ secrets.DIPLODOC_ACCESS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DIPLODOC_SECRET_ACCESS_KEY }}
- name: Release
uses: diplodoc-platform/docs-release-action@v2
with:
revision: "${{ github.sha }}"
storage-bucket: ${{ secrets.DIPLODOC_STORAGE_BUCKET }}
storage-access-key-id: ${{ secrets.DIPLODOC_ACCESS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DIPLODOC_SECRET_ACCESS_KEY }}
Loading