initial: action/site-publish @v1
This commit is contained in:
+64
@@ -0,0 +1,64 @@
|
||||
name: Publish Site
|
||||
description: Build and deploy a site (static, hugo, mkdocs, or docker) to fritzlab k8s.
|
||||
inputs:
|
||||
token:
|
||||
description: Gitea token (ci-bot) for apps repo push and API operations
|
||||
required: true
|
||||
s3-access-key:
|
||||
description: Garage ci-deploy-key access key id (required for static/hugo/mkdocs)
|
||||
required: false
|
||||
s3-secret-key:
|
||||
description: Garage ci-deploy-key secret access key (required for static/hugo/mkdocs)
|
||||
required: false
|
||||
registry-password:
|
||||
description: Container registry password (required for docker type; defaults to token)
|
||||
required: false
|
||||
s3-endpoint:
|
||||
description: Garage S3 endpoint URL
|
||||
required: false
|
||||
default: http://garage.storage.svc:3900
|
||||
garage-admin-token:
|
||||
description: Garage admin API token (required for static/hugo/mkdocs to reconcile bucket aliases)
|
||||
required: false
|
||||
garage-admin-endpoint:
|
||||
description: Garage admin API endpoint URL
|
||||
required: false
|
||||
default: http://garage.storage.svc:3903
|
||||
username:
|
||||
description: Gitea username for git operations
|
||||
required: false
|
||||
default: ci-bot
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup
|
||||
shell: bash
|
||||
run: python3 ${{ github.action_path }}/scripts/setup.py
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: python3 ${{ github.action_path }}/scripts/publish.py build
|
||||
env:
|
||||
SITE_REPO: ${{ github.repository }}
|
||||
SITE_DIR: ${{ github.workspace }}
|
||||
ACTION_DIR: ${{ github.action_path }}
|
||||
GITHUB_RUN_NUMBER: ${{ github.run_number }}
|
||||
REGISTRY_PASSWORD: ${{ inputs.registry-password || inputs.token }}
|
||||
CI_BOT_USER: ${{ inputs.username }}
|
||||
|
||||
- name: Deploy
|
||||
shell: bash
|
||||
run: python3 ${{ github.action_path }}/scripts/publish.py deploy
|
||||
env:
|
||||
SITE_REPO: ${{ github.repository }}
|
||||
SITE_DIR: ${{ github.workspace }}
|
||||
ACTION_DIR: ${{ github.action_path }}
|
||||
CI_BOT_TOKEN: ${{ inputs.token }}
|
||||
CI_BOT_USER: ${{ inputs.username }}
|
||||
AWS_ACCESS_KEY_ID: ${{ inputs.s3-access-key }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ inputs.s3-secret-key }}
|
||||
AWS_DEFAULT_REGION: sjc001
|
||||
GARAGE_S3_ENDPOINT: ${{ inputs.s3-endpoint }}
|
||||
GARAGE_ADMIN_ENDPOINT: ${{ inputs.garage-admin-endpoint }}
|
||||
GARAGE_ADMIN_TOKEN: ${{ inputs.garage-admin-token }}
|
||||
GITHUB_RUN_NUMBER: ${{ github.run_number }}
|
||||
Reference in New Issue
Block a user