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

ci: restore build-and-deploy workflow #671

Merged
merged 2 commits into from
Nov 13, 2024
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
50 changes: 45 additions & 5 deletions .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,50 @@ jobs:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

build-and-deploy:
uses: electron/website/.github/workflows/build-and-deploy.yml@main
name: Build and deploy the website
runs-on: ubuntu-latest
permissions:
actions: read
with:
branch: main
secrets:
SAS: ${{ secrets.SAS }}
steps:
- name: Set GIT_BRANCH
run: echo "GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Print GIT_BRANCH
run: echo $GIT_BRANCH
- name: Print content
run: ls -ln
# This should be set up from earlier
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag: v4.2.2
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # tag: v4.0.4
with:
node-version: 20
- name: Install dependencies
uses: bahmutov/npm-install@dc9579d3dfb9c0e7a1f56c194eefcb8e2c9f0da5 # tag: v1.10.3
- name: Lint
run: yarn lint
env:
CI: true
# FIXME: this is stalling
# - name: Download cache
# uses: nick-invision/retry@7152eba30c6575329ac0576536151aca5a72780e # tag: v3.0.0
# with:
# timeout_seconds: 300
# max_attempts: 3
# retry_on: error
# command: ./scripts/bin/azcopy copy "https://electronwebsite.blob.core.windows.net/%24web/*?$SAS" "./build" --recursive
# env:
# SAS: ${{ secrets.SAS }}
- name: Add Docusaurus problem matcher
run: echo "::add-matcher::.github/problem-matchers/docusaurus.json"
- name: Build default locale site
run: yarn build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish everything to Storage
uses: nick-invision/retry@7152eba30c6575329ac0576536151aca5a72780e # tag: v3.0.0
with:
timeout_seconds: 300
max_attempts: 3
retry_on: error
command: ./scripts/bin/azcopy copy "./build/*" "https://electronwebsite.blob.core.windows.net/%24web/?$SAS" --recursive
env:
SAS: ${{ secrets.SAS }}
71 changes: 0 additions & 71 deletions scripts/build-as-doc-version.js

This file was deleted.