Skip to content

Commit

Permalink
configured gitlab-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jhilker98 committed Sep 30, 2023
1 parent f465995 commit 4676f69
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 38 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
node-version: 18.x

- run: npm clean-install
- run: npm install -D 'https://gitpkg.now.sh/stramel/astro-icon/packages/core?main'
- run: npm install @iconify/json

- name: Build
run: npm run build
Expand All @@ -32,4 +30,4 @@ jobs:
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_dir: ./public
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ pnpm-debug.log*
.envrc
cypress/videos
cypress/screenshots
public/
47 changes: 12 additions & 35 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,22 @@
variables:
GIT_SUBMODULE_STRATEGY: recursive
# The Docker image that will be used to build your app
image: node:lts

stages:
- build
- test
- deploy


build:
image: node:latest
script:
- npm ci --cache .npm --prefer-offline
pages:
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- .npm/


test:
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
needs: [build]
before_script:
- apk add --update --no-cache git npm
- node_modules/
script:
# - hugo --enableGitInfo -b "https://jhilker.gitlab.io"
- npm ci --cache .npm --prefer-offline
- hugo --minify -b "https://jhilker.gitlab.io"
except:
- main
# Specify the steps involved to build your app here
- npm install
- npm run build

pages:
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
needs: [build]
before_script:
- apk add --update --no-cache git npm
script:
# - hugo --enableGitInfo -b "https://jhilker.gitlab.io"
- npm ci --cache .npm --prefer-offline
- hugo --minify -b "https://jhilker.gitlab.io"
artifacts:
paths:
# The folder that contains the built files to be published.
# This must be called "public".
- public

only:
# Trigger a new build and deploy only when there is a push to the
# branch(es) below
- main
2 changes: 2 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { rehypeAccessibleEmojis } from 'rehype-accessible-emojis';
// https://astro.build/config
export default defineConfig({
site: "https://jhilker.com",
outDir: "public",
publicDir: "static",
integrations: [mdx(), tailwind(), alpinejs()],

markdown: {
Expand Down
9 changes: 9 additions & 0 deletions static/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4676f69

Please sign in to comment.