Skip to content

15 subsequent fixes for cicd #16

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

Merged
merged 2 commits into from
Dec 26, 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
2 changes: 0 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ FROM mcr.microsoft.com/devcontainers/base:alpine-${ALPINE_VERSION}

ARG NODE_VERSION
RUN apk update && apk add --no-cache nodejs=${NODE_VERSION} npm

WORKDIR /workspaces/datc
3 changes: 1 addition & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
NODE_VERSION=20.15
UBUNTU_VERSION=20.04
NODE_VERSION=20.15
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: Storybook to GitHub Pages Pipeline
name: Continuous Deployment Pipeline

permissions:
contents: write
pages: write
id-token: write

on:
push:
branches:
- production

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
deploy:
deploy-storybook-to-github-pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down Expand Up @@ -50,3 +50,34 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

publish-package-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm ci

- name: Get version
id: package-version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

- name: Create and push tag
run: |
git tag v${{ steps.package-version.outputs.version }}
git push origin v${{ steps.package-version.outputs.version }}

- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41 changes: 0 additions & 41 deletions .github/workflows/publish-package.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Version Check
name: Versioning Pipeline

on:
pull_request:
branches:
- production

jobs:
version-check:
check:
runs-on: ubuntu-latest

steps:
Expand Down
Loading