Release #1401
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: Release | |
on: | |
push: | |
tags: | |
- "*.*" | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.23' | |
id: go | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '18' | |
check-latest: true | |
- name: Install yq | |
run: | | |
curl -fsSL -o yqq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64 | |
chmod +x yqq | |
sudo mv yqq /usr/local/bin/yqq | |
pipx install yq | |
- name: Install Hugo | |
run: | | |
curl -fsSL -o hugo_extended.deb https://github.com/gohugoio/hugo/releases/download/v0.111.1/hugo_extended_0.111.1_linux-amd64.deb | |
sudo dpkg -i hugo_extended.deb | |
- name: Install Hugo Tools | |
run: | | |
curl -fsSL -o hugo-tools https://github.com/appscodelabs/hugo-tools/releases/download/v0.2.23/hugo-tools-linux-amd64 | |
chmod +x hugo-tools | |
sudo mv hugo-tools /usr/local/bin/hugo-tools | |
- name: Install Firebase CLI | |
run: | | |
npm i -g firebase-tools | |
# - name: QA | |
# env: | |
# FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
# GOOGLE_CUSTOM_SEARCH_API_KEY: ${{ secrets.GOOGLE_CUSTOM_SEARCH_API_KEY }} | |
# if: startsWith(github.event.ref, 'refs/tags/') && (contains(github.ref, '-alpha.') || contains(github.ref, '-beta.')) | |
# run: | | |
# npm install | |
# make assets | |
# make qa | |
- name: Release | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
GOOGLE_CUSTOM_SEARCH_API_KEY: ${{ secrets.GOOGLE_CUSTOM_SEARCH_API_KEY }} | |
# if: startsWith(github.event.ref, 'refs/tags/') && (contains(github.ref, '-alpha.') || contains(github.ref, '-beta.')) == false | |
run: | | |
npm install | |
make assets | |
make release | |
- name: Update search index | |
env: | |
MEILISEARCH_ADMIN_API_KEY: ${{ secrets.MEILISEARCH_ADMIN_API_KEY }} | |
# if: startsWith(github.event.ref, 'refs/tags/') && (contains(github.ref, '-alpha.') || contains(github.ref, '-beta.')) == false | |
run: | | |
curl \ | |
-X POST 'https://search.docs.appscode.com/indexes' \ | |
-H "Authorization: Bearer $MEILISEARCH_ADMIN_API_KEY" \ | |
-H 'Content-Type: application/json' \ | |
--data-binary '{ | |
"uid": "blog", | |
"primaryKey": "documentId" | |
}' | |
curl \ | |
-X POST 'https://search.docs.appscode.com/indexes/blog/documents' \ | |
-H "Authorization: Bearer $MEILISEARCH_ADMIN_API_KEY" \ | |
-H 'Content-Type: application/json' \ | |
--data-binary @public/index.json |