admin home #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ui | |
on: | |
push: | |
branches: | |
- development | |
workflow_dispatch: | |
jobs: | |
build: | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
contents: read | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
- name: Install dependencies | |
run: npm install --prefix ./web/ui | |
- name: Build UI | |
run: npm run build-github --prefix ./web/ui | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: 'latest' | |
- name: Build Docs | |
run: hugo --source docs --noBuildLock --destination ../static/dist/docs | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
# upload entire directory | |
path: './static/dist' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
# build-tls-generator: | |
# runs-on: ubuntu-latest | |
# | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v4 | |
# | |
# - name: Setup Golang | |
# uses: actions/setup-go@v4 | |
# with: | |
# go-version: '1.21' | |
# | |
# - name: Build | |
# run: | | |
# go vet ./tools/tls_generator | |
# | |
# GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-s -w" -o ./releases/tls_generator_linux_amd64 ./tools/tls_generator | |
# | |
# GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-s -w" -o ./releases/tls_generator_linux_arm64 ./tools/tls_generator | |
# | |
# GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-s -w" -o ./releases/tls_generator_darwin_amd64 ./tools/tls_generator | |
# | |
# GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-s -w" -o ./releases/tls_generator_darwin_arm64 ./tools/tls_generator | |
# | |
# GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-s -w" -o ./releases/tls_generator_windows_amd64.exe ./tools/tls_generator | |
# | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# path: ./releases/tls_generator_linux_amd64 | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# path: ./releases/tls_generator_linux_arm64 | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# path: ./releases/tls_generator_darwin_amd64 | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# path: ./releases/tls_generator_darwin_arm64 | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# path: ./releases/tls_generator_windows_amd64.exe |