Skip to content

Commit

Permalink
Testing new deployment file
Browse files Browse the repository at this point in the history
Deploy to production plsss
  • Loading branch information
petertonysmith94 authored Jan 20, 2024
2 parents 982d8a1 + 08566d9 commit 945ca18
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 91 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: 🏗️ Build
name: build
run-name: 🚀 Build
on:
push:
branches:
- main
- release/**

pull_request:
branches:
- main
Expand All @@ -17,6 +19,7 @@ concurrency:

jobs:
build:
name: 🚀 Build
runs-on: ubuntu-latest
steps:
- name: 🛎️ Checkout
Expand All @@ -32,26 +35,7 @@ jobs:
run: pnpm run build

- name: 📦 Upload Build Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
name: "build-artifact-${{ github.sha }}"
path: build

deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3

- name: 📦 Download Build Artifact
uses: actions/download-artifact@v2
with:
name: "build-artifact-${{ github.sha }}"
path: build

- name: 🔺 Publish our Build Artifacts
uses: actions/upload-pages-artifact@v2
with:
name: github-pages
path: build
41 changes: 41 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: deploy
run-name: 🚀 Deploy
on:
workflow_run:
workflows: ["build"]
branches: ["main", "release/*"]
types:
- completed

env:
DEPLOY_PREVIEW: ${{ github.event.workflow_run.event == 'pull_request' }}
ARTIFACT_NAME: "build-artifact-${{ github.sha }}"



jobs:
deploy:
# Only run if the build was successful
if: ${{ github.event.workflow_run.conclusion == 'success' }}

name: 🚀 Deploy
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

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

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: ${{ env.ARTIFACT_NAME}}
preview: ${{ env.DEPLOY_PREVIEW }}

- name: Get the URL for the deployment
run: echo "${{ steps.deployment.outputs.page_url }}"
5 changes: 5 additions & 0 deletions src/assets/email.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions src/config.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { ReactComponent as GithubIcon } from './assets/github.svg';
import { ReactComponent as LinkedInIcon } from './assets/linkedin.svg';
import { ReactComponent as EmailIcon } from './assets/email.svg';
import { ReactComponent as Logo } from './assets/logo.svg';
import Profile from './pages/profile.md'
import Experience from './pages/experience.md'
import Projects from './pages/projects.md'
import Sources from './pages/projects.md'
import ReactMarkdown from 'react-markdown';

const markdown = (contents: string) => (<><ReactMarkdown children={contents} /></>);
Expand All @@ -22,12 +20,14 @@ const config = {
url: 'https://www.linkedin.com/in/petertonysmith/',
icon: LinkedInIcon
},
{
name: 'Email',
url: 'mailto:[email protected]',
icon: EmailIcon
}
],
pages: [
() => markdown(Profile),
() => markdown(Experience),
() => markdown(Projects),
() => markdown(Sources),
]
};

Expand Down
31 changes: 0 additions & 31 deletions src/pages/experience.md

This file was deleted.

32 changes: 0 additions & 32 deletions src/pages/projects.md

This file was deleted.

6 changes: 5 additions & 1 deletion src/pages/sources.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Sources

[Shubham Dhage | 3D Artist](https://unsplash.com/@theshubhamdhage)
[Shubham Dhage | 3D Artist](https://unsplash.com/@theshubhamdhage)

- [./assets/shubham-dhage-pringle-layers.jpg](../assets/shubham-dhage-pringle-layers.jpg)
- [./assets/shubham-dhage-sphere-center.jpg](../assets/shubham-dhage-sphere-center.jpg)
- [./assets/shubham-dhage-sphere-offset-left.jpg](../assets/shubham-dhage-sphere-offset-left.jpg)

0 comments on commit 945ca18

Please sign in to comment.