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

Deploy successully on github pages. #5

Merged
merged 10 commits into from
Nov 24, 2023
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
55 changes: 55 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

on:
push:
branches: ["main"]
workflow_dispatch:

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

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

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Set Git user name
run: git config --global user.name "Github Actions Bot"
- name: Set Git user email
run: git config --global user.email "[email protected]"
- name: Generate index.html from portable.php
run: php portable.php > index.html
- name: Add index.html, style.css, and new markdown files to git
run: git add -A
- name: Commit changes
run: git commit -m "Generated new artifacts"
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

needs: build

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 2 additions & 0 deletions content/2023-11-24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Test
**It working**
2 changes: 1 addition & 1 deletion portable.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ function create_slug($string){

execution time: <?php echo $executionTime = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"]; ?> seconds -->
</body>
</html>
</html>