Merge pull request #17 from unknown-o/mod-1 #193
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: ci | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Run install | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install | |
- name: Build production bundle | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: build | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to private registry | |
uses: docker/#-action@v3 | |
with: | |
registry: ${{ secrets.REGISTRY_URL }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ secrets.REGISTRY_URL }}/vue-rainyun/doc/doc:${{ github.sha }} | |
- name: Sleep for 60 seconds | |
run: sleep 60s | |
shell: bash | |
# - name: Run scraper | |
# env: | |
# APPLICATION_ID: ${{ secrets.APPLICATION_ID }} | |
# API_KEY: ${{ secrets.API_KEY }} | |
# run: | | |
# CONFIG="$(cat docsearch-config.json)" | |
# docker run -i --rm \ | |
# -e APPLICATION_ID=$APPLICATION_ID \ | |
# -e API_KEY=$API_KEY \ | |
# -e CONFIG="${CONFIG}" \ | |
# algolia/docsearch-scraper | |