mirror of
https://github.com/podman-desktop/podman-desktop
synced 2026-04-21 09:37:22 +00:00
80 lines
2.5 KiB
YAML
80 lines
2.5 KiB
YAML
#
|
|
# Copyright (C) 2022 Red Hat, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
name: Publish Website
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'package.json'
|
|
- 'pnpm-lock.yaml'
|
|
- 'storybook/**'
|
|
- 'website/**'
|
|
- 'packages/extension-api/src/**'
|
|
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
deploy:
|
|
permissions:
|
|
contents: write # for peaceiris/actions-gh-pages to push pages branch
|
|
name: Build and deploy website
|
|
runs-on: ubuntu-24.04
|
|
# disable on forks as secrets are not available
|
|
if: github.event.repository.fork == false
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
with:
|
|
ref: ${{ needs.tag.outputs.githubTag}}
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
|
|
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
|
|
with:
|
|
node-version: 24
|
|
cache: 'pnpm'
|
|
|
|
- name: Execute pnpm
|
|
run: pnpm install
|
|
|
|
- name: Run Build
|
|
timeout-minutes: 20
|
|
run: pnpm website:build
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
# Build output to publish to the `gh-pages` branch:
|
|
publish_dir: ./website/build
|
|
# The following lines assign commit authorship to the official
|
|
# GH-Actions bot for deploys to `gh-pages` branch:
|
|
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
|
|
# The GH actions bot is used by default if you didn't specify the two fields.
|
|
# You can swap them out with your own user credentials.
|
|
user_name: github-actions[bot]
|
|
user_email: 41898282+github-actions[bot]@users.noreply.github.com
|